package extend.client.format;

import extend.client.base.Request;
import hehe.json.Json;


/**
 * json 序列化参数
 *<B>说明：</B>
 *<pre>
 * 略
 *</pre>
 *<B>示例：</B>
 *<pre>
 *  略
 *</pre>
 *<B>日志：</B>
 *<pre>
 *  略
 *</pre>
 *<B>注意事项：</B>
 *<pre>
 *  略
 *</pre>
 */
public class JsonFormatter implements Formatter
{
    public void format(Request request)
    {
        try {
            request.setHeader("content-type","application/json");
            request.setContent(Json.format(request.getData()));
        } catch (Exception ex) {

        }
    }
}
